﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="EditorsProfile.aspx.vb" Inherits="CricketForum.CricShare" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <h1>
            List of Registered Users and Contribution to the Cricket Forum Blog
        </h1>
    </div>
    <br />
    <table>
        <tr>
            <td>

            
                <asp:Chart ID="Chart1" runat="server" DataSourceID="CricketPlayersDataSource" Width="900px"
                    Height="300px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="UserName" YValueMembers="PostedInfo" ToolTip="Number of Postings">
                        </asp:Series>
                        <asp:Series Name="Series3" XValueMember="UserName" YValueMembers="QuariesAnswered"  ToolTip="Number of Quaries Answered" 
                          >
                        </asp:Series>
                        <asp:Series Name="Series4" XValueMember="UserName" YValueMembers="PostedComments" ToolTip="Number of Comments Posted" >
                        </asp:Series>
                        <asp:Series Name="Series2" XValueMember="UserName" YValueMembers="CommentsLikedByOthers"  ToolTip="Comments Liked by Users in Numbers"  >
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <AxisY Title="Contribution to website in terams of Numbers" ToolTip="Number of Postings,Quaries Answered,Comments Posted and Comments Liked "
                               >
                            </AxisY>
                           
                            <AxisX Title="User Name" IsLabelAutoFit="True" >
                            </AxisX>
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
    </table>
    <div>
        <p>
            <asp:GridView ID="gvPlayers" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                DataSourceID="CricketPlayersDataSource" Width="100%" AllowPaging="True" PageSize="5">
                <EmptyDataTemplate>
                    No Data Found.
                </EmptyDataTemplate>
                <HeaderStyle CssClass="H1" />
                <Columns>
                    <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
                    <asp:BoundField DataField="Name" HeaderText="Full Name" SortExpression="Name" />
                    <asp:BoundField DataField="DOB" HeaderText="Date Of Birth" SortExpression="DOB" />
                    <asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender" />
                    <asp:BoundField DataField="PostedInfo" HeaderText="Posted Information" SortExpression="PostedInfo" />
                    <asp:BoundField DataField="QuariesAnswered" HeaderText="Queries Answered" SortExpression="QuariesAnswered" />
                    <asp:BoundField DataField="PostedComments" HeaderText="Posted Comments" SortExpression="PostedComments" />
                    <asp:BoundField DataField="CommentsLikedByOthers" HeaderText="Comments Liked By Others"
                        SortExpression="CommentsLikedByOthers" />
                    <asp:ImageField DataImageUrlField="UserPicture" HeaderText="Profile Picture">
                        <ControlStyle Height="100px" Width="150px" />
                    </asp:ImageField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="CricketPlayersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringWorldsCricket %>"
                ProviderName="<%$ ConnectionStrings:ConnStringWorldsCricket.ProviderName %>"
                SelectCommand="SELECT userprofile.UserName, FirstName & ' ' & LastName AS Name, Gender.Gender as Gender, userprofile.UserPicture, Format(DateOfBirth,'dd/mm/yyyy') AS DOB, userprofile.PostedInfo, userprofile.CommentsLikedByOthers, userprofile.QuariesAnswered,userprofile.PostedComments FROM Gender Right JOIN userprofile ON Gender.ID = userprofile.Gender order by userprofile.username">
            </asp:SqlDataSource>
        </p>
    </div>
</asp:Content>
